package com.hotelvip.common.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * @author Lzh
 * @date 2021/7/12 14:04
 */
@Configuration
public class WebConfig extends WebMvcConfigurerAdapter {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        //将所有/fileupload/** 访问都映射到classpath:/fileupload/ 目录下
        registry.addResourceHandler("/fileupload/**").addResourceLocations("classpath:/fileupload/");
    }

}
